


***********************************************
****** The Impact of Soft-Skills Training *****
******    for Entrepreneurs in Jamaica    *****
***********************************************


* This is the code for the replication of the paper "The Impact of Soft-Skills Training for Entrepreneurs in Jamaica".
* This do-file prepares the data collected, so that it can be used for the analysis.
* The code cleans the raw data from the baseline surveys (Qualtrics and SurveyMonkey), the 1st follow-up, and the 2nd follow-up, 
* as well as the attendance data. It also combines it with auxiliary data, and generates variables for the analysis.
* For convenience, the entire data preparation process has been split into several do-files. For each survey wave (baseline, follow-up 1, and follow-up 2), 
* there is one do-file for the data cleaning and one for data creation (generating clean variables). Finally, there is a do-file merging
* the three survey waves together. This do-file simply calls the other do-files.

* (!) The data preparation do-files are provided only to clarify how variables were created.
* All the data (including raw data) is included in the published dataset. For this reason, the individual datasets 
* used in this data preparation were NOT published. Therefore, these do-files cannot be run as they are.
* Please read the related README file to find more details.



clear all
cap log close
set more off
set varabbrev off




*******************
*** Directories ***
*******************

* Set global macros with directories
global directory "## INSERT HERE YOUR MAIN DIRECTORY ##"
global data_raw "Data/Raw data"
global data_int "Data/Intermediate and auxiliary data"
global data_fin "Data/Final data"
global results_tab "Results/Tables"
global results_fig "Results/Figures"
global codes "Codes"

* Change current directory
cd "$directory"




************************
*** Data Preparation ***
************************


* Clean data from baseline
do "$codes/1_bas_data_cleaning"

* Prepare data from baseline for analysis
do "$codes/2_bas_data_creation"

* Clean data from follow-up 1
do "$codes/3_fu1_data_cleaning"

* Prepare data from follow-up 1 for analysis
do "$codes/4_fu1_data_creation"

* Clean data from follow-up 2
do "$codes/5_fu2_data_cleaning"

* Prepare data from follow-up 2 for analysis
do "$codes/6_fu2_data_creation"

* Merge data from baseline, follow-up 1 and follow-up 2
do "$codes/7_data_merge"

